home *** CD-ROM | disk | FTP | other *** search
-
-
- l
-
- l
-
- åLimitations
-
-
-
- Some applications refuse to submit to the trickery of Menu Events. The
-
- prime example is any version of Finder which predates the Power
-
- Macintosh (version 7.1.2). It is not truly an Apple event server, and it
-
- only respects events of known types. Any other high-level event is not
-
- replied to, and the send will time out. ResEdit 2.1.1 is similar. Some
-
- Microsoft applications handle Apple events in a non-standard fashion,
-
- binding their own event handlers over all Apple event classes, and
-
- therefore should not be targeted.
-
-
-
- The only way to know for sure is to try the ones you are interested in
-
- controlling. Certainly, anything you write yourself is a candidate, as long
-
- as you follow the practices suggested in Apple documentation, namely: Be
-
- high-level-event-aware. Always be ready to accept and dispatch an
-
- Apple event. Assume that any high-level event you donΓÇÖt recognize is an
-
- Apple event, and dispatch it as such. If an unknown event reaches your
-
- wildcard event handler, return errAEEventNotHandled, so that system
-
- event handlers can get a crack at it. DonΓÇÖt deny other programs on the
-
- same machine the right to request user interaction, which is the default.
-
-
- Another limitation you should know about is that Menu Events canΓÇÖt
-
- operate dialogs and alerts which the target application may post in
-
- response to the menu action. If the menu item text ends in an ellipsis
-
- ('…') character, you can bet that the application will post a dialog or alert
-
- box. It is then up to the local user to operate the controls.
-
-
- If the target machine is under the influence of a screen saver or security
-
- package which would present a modal dialog in response to a mouse click,
-
- then Query Menu and Select Menu Item events will time out. The same is
-
- true if the target machine is already showing a modal dialog, preventing
-
- Menu Events from activating the target application.
-
-
- A known conflict exists between Menu Events and Help on Wheels. If you
-
- send a Menu event to an application which does a casual help display
-
- before performing the menu action, and if the help server is running,
-
- problems may occur with the application. The problem is that the Menu
-
- eventΓÇÖs user interaction ends when the receiving application sends an
-
- Apple event to the help server, causing it to return to the background. If
-
- the menu action causes a call to the Standard File Manager or any other
-
- code which should not be called when in the background, the application
-
- may hang.
-
-
-
-
-
- ΓÇô
-
- ΓÇô
-
- åProgrammer Notes
-
-
-
- Write to the author at the above address if you want to know more about
-
- the Menu Events extension or how it was programmed.
-
-
-
-
-
-
- 4
-
- 4
-
- åAcknowledgements
-
-
-
- Thanks to C.K. Haun and the other folks at Apple Developer Technical
-
- Support who put together those clever little code snippets which give
-
- folks like me such odd ideas.
-
-
-
- Special thanks to the many fine people who beta-tested this software,
-
- including Ken Linger, Chris Reynolds, Michele Marques, Chris Kaltwasser,
-
- James Edward Davis, and Leonard Rosenthol, and to Fred Terry for his
-
- hospitality at the MacScripting mailing list.
-
-
-
-
-
- ├▓
-
- ├▓
-
- åRevision History
-
-
-
- Click on any underlined item in this listing to read more about the revision
-
- it describes.
-
-
-
- 1.3 (March 6, 1996)
-
- ΓÇó Public AWOL Utilities 1.3 release.
-
- ΓÇó Allowed menus and menu items to be specified using string parameters,
-
- with or without the corresponding numeric ID parameters. An error is
-
- returned if the numeric and string parameters do not match.
-
- ΓÇó Added support for modifier keys (Shift, Control, Option, Command) in
-
- the Query Menu event.
-
- ΓÇó Improved application compatibility by simulating a menu bar click, to
-
- force the application to update its menus, before reading the contents of a
-
- menu in response to a Query Menu or Select Menu Item event.
-
- ΓÇó Changed the response to a menu selection with the Caps Lock key down
-
- to a simple Apple event recording action, instead of having the target
-
- application send itself a Menu event to invite recording.
-
- ΓÇó Added an error string parameter to the reply event when an error
-
- occurs.
-
- ΓÇó Moved the error codes from the -21000 range to the -15950 range, so
-
- that errors are reported sensibly in AppleScript alerts.
-
- ΓÇó Rewrote ΓÇ£Menu Events Sample ScriptΓÇ¥ to make use of the new optional
-
- string parameters.
-
-
- 1.2 (October 17, 1994)
-
- ΓÇó Public AWOL Utilities 1.2 release.
-
- ΓÇó No revisions.
-
-
- 1.1.2 (April 19, 1994)
-
- ΓÇó Added support for script recording by forcing high-level-event-aware
-
- applications to send themselves Menu events when the user selects a
-
- menu item and the Caps Lock key is down.
-
- ΓÇó Added support for modifier keys (Shift, Control, Option, Command) in
-
- the Select Menu Item event.
-
- ΓÇó Removed the nonStandardMenuErr (-21004) code in favor of the new
-
- keyMenuMDEFID parameter in the reply to the Query Menu List event, to
-
- improve compatibility with target applications which use slightly
-
- non-standard menu definition procedures.
-
-
- 1.1.1 (April 11, 1994)
-
- ΓÇó Added ΓÇ£Menu Events Scripting AdditionΓÇ¥ and ΓÇ£Menu Events Sample
-
- ScriptΓÇ¥ in place of ΓÇ£Menu Events 'aete'ΓÇ¥ resource file.
-
-
- 1.1 (March 28, 1994)
-
- ΓÇó Public AWOL Utilities 1.1 release.
-
- ΓÇó Documented that Menu Events works with Finder 7.1.2.
-
-
- 1.0.7 (March 13, 1994)
-
- ΓÇó Menu Events Help presents a useful message if the user tries to open or
-
- print it when the help server is absent.
-
-
- 1.0.6 (February 27, 1994)
-
- ΓÇó Added protection against loading duplicate copies of the extension.
-
-
- 1.0.5 (February 6, 1994)
-
- ΓÇó Improved compatibility with At Ease and other applications which flush
-
- mouse-down events when they become active.
-
-
- 1.0.4 (January 30, 1994)
-
- ΓÇó If the Shift key is pressed on startup, the extension will not be loaded.
-
- If the Help or Command-? key is pressed, the extension will delay up to
-
- one second to let the user release the key(s).
-
-
- 1.0.3 (January 19, 1994)
-
- ΓÇó Added ΓÇ£Menu Events 'aete'ΓÇ¥ resource file.
-
-
- 1.0.2 (January 11, 1994)
-
- ΓÇó Fixed bug which sent the target application into a notification wait state
-
- if it received a Menu event from a remote sender.
-
-
- 1.0.1 (December 31, 1993)
-
- ΓÇó Initial AWOL Utilities 1.0.1 release.
-
-